import request from '@/utils/request'

export function getRoutes() {
  return request({
    url: '/menus/routes',
    method: 'get'
  })
}

export function getMenus() {
  return request({
    url: '/menus',
    method: 'get'
  })
}

export function addMenus(data) {
  return request({
    url: '/menus',
    method: 'post',
    data
  })
}

export function updateMenus(data) {
  return request({
    url: '/menus',
    method: 'put',
    data
  })
}

export function deleteMenus(id) {
  return request({
    url: '/menus/' + id,
    method: 'delete'
  })
}
